package com.weiweb.action;

import com.weiweb.common.SessionConstant;
import com.weiweb.domain.Task;
import com.weiweb.domain.User;
import com.weiweb.service.ITaskService;

public class HomeAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3752780124625979197L;
	
	private ITaskService taskService;
	
	private Task task=new Task();
	
	public String execute(){
		return "success";
	}
	
	public String addTask(){
		User user=(User)session.get(SessionConstant.SESSION_USER);
		task.setUser(user);
		taskService.addTask(task);
		return "taskCenter";
	}

	public ITaskService getTaskService() {
		return taskService;
	}

	public void setTaskService(ITaskService taskService) {
		this.taskService = taskService;
	}

	public Task getTask() {
		return task;
	}

	public void setTask(Task task) {
		this.task = task;
	}
	
	

	
}
